/*
 * @Description: page name
 * @Author: Huang Junjie
 * @Date: 2021-04-25 18:36:26
 * @LastEditTime: 2021-05-06 17:15:58
 * @LastEditors: Huang Junjie
 */
import request from '@/utils/request';

// 分页查询
export function getDataList(params) {
  return request({
    url: `/jjxt/rules/pageData`,
    method: 'get',
    params
  });
}

// 批量删除
export function deleteData(data) {
  return request({
    url: `/jjxt/rules/remove`,
    method: 'delete',
    data
  });
}

// 批量失效
export function invalidData(data) {
  return request({
    url: `/jjxt/rules/ruleState`,
    method: 'put',
    data
  });
}

// 获取规章类型
export function getRulesTypeDataList(params) {
  return request({
    url: `/jjxtapi/dict/findByDtId`,
    method: 'get',
    params
  });
}

// 保存或更新
export function updateDataList(data) {
  return request({
    url: `/jjxt/rules/saveOrUpdateData`,
    method: 'post',
    data
  });
}

// 获取规章制度下的上传部门
export function getUploadDeptDataList() {
  return request({
    url: `/jjxt/rules/uploadDept`,
    method: 'get'
  });
}

// 获取规章制度下的年份
export function getyearDataList() {
  return request({
    url: `/jjxt/rules/year`,
    method: 'get'
  });
}
